/// Author: QP
/// Version: 1.0
/// Date:2023/06/05
/// WS 元数据类，用于开放视图等
Class WS.Meta Extends %RegisteredObject
{

/// 建立HCC数据元视图
Query WSDataElement() As %SQLQuery [ SqlView ]
{
    SELECT category.parent as name,category._Default as category,descr._Default as description,format._Default as format,valueset._Default as valueset,dt._Default as datatype
from 
(SELECT parent, _Default
FROM %Dictionary.ParameterDefinition where parent %Startswith 'WS.DE.DE'
and name='Category') category,
(SELECT parent, _Default
FROM %Dictionary.ParameterDefinition where parent %Startswith 'WS.DE.DE'
and name='Description') descr,
(SELECT parent, _Default
FROM %Dictionary.ParameterDefinition where parent %Startswith 'WS.DE.DE'
and name='Format') format,
(SELECT parent, _Default
FROM %Dictionary.ParameterDefinition where parent %Startswith 'WS.DE.DE'
and name='ValueSet') valueset,
(SELECT parent, _Default
FROM %Dictionary.ParameterDefinition where parent %Startswith 'WS.DE.DE'
and name='WSDT') dt
where category.parent=valueset.parent
  and category.parent=descr.parent
  and category.parent=format.parent
  and category.parent=dt.parent
}

}
